#ifndef CARD_H
#define CARD_H

#include <string>
using namespace std;
// class created by CP Botha
//edited by NA Molapo
//edited by AB Arakkal
class Card
{
public:
     /*!
     * \brief Card contructor  Card(char,int,int,string)
     * \param char suit
     * \param int id
     * \param int owner
     * \param string num/tring count
     */
    Card(char,int,int,string);// Card(suit,id,owner,num);
    /*!
     * \brief updateTrump update card trump flag
     */
    void updateTrump();   // update the ID of the trump suit
    /*!
     * \brief updateOwner update card owner
     * \param int owner id
     */
    void updateOwner(int);  //update Owner of card
    /*!
     * \brief suit char containing card suit, H-heart, C-clubs, D-diamonds, S- spades
     */
    char suit;	// suit H-heart, C-clubs, D-diamonds, S- spades
    /*!
     * \brief id int containing card id
     */

    int id;         // card ID
    /*!
     * \brief owner int containing card owner
     */
    int owner;
    /*!
     * \brief num string containing card num/trick count,01-10|0J,0Q,0K,0A
     */
    string	num;    // 01-10|0J,0Q,0K,0A
    /*!
     * \brief print print out card on command line for debugging
     */
    void print();   //print card for debugging
    /*!
     * \brief toNumber converts num/trick count to int
     * \return returns num/trick count as int
     */
    int toNumber(); //returns num int value
    /*!
     * \brief operator < overloaded operator used for comparing cards
     * \param rhs pointer to card
     * \return bool value
     */
    bool operator< (const Card& rhs);
    /*!
     * \brief operator > overloaded operator used for comparing cards
     * \param rhs pointer to card
     * \return bool value
     */
    bool operator> (const Card& rhs);
    /*!
     * \brief operator = overloaded operator used to assign card objects
     * \param rhs pointer to card
     * \return Card object
     */
    Card operator = (const Card& rhs);
    /*!
     * \brief operator == overloaded operator used for comparing cards
     * \param rhs pointer to card
     * \returnCard object
     */
    bool operator== (const Card& rhs);// compare suit,number
    /*!
     * \brief trump flag set true if card is of trump suit
     */
    bool trump;

private:
    int getSuitVal(char); //used by operators
    int getNumValue(string); //used by operators

};

#endif // CARD_H
